#pragma once

#include<iostream>
#include<unistd.h>
#include<fcntl.h>
#include<cstring>
#include<cerrno>

void printfLog()
{
    std::cout<<"this a Log"<<std::endl;
}

void download()
{
    std::cout<<"this a download"<<std::endl;
}
void executeSql()
{
    std::cout<<"this a executeSql"<<std::endl;
}

void setNoBlock(int fd)//将该文件描述符设置为非阻塞
{
    int fl = fcntl(fd,F_GETFL);
    if(fl<0)
    {
        std::cerr<<"fcntl"<<strerror(errno)<<std::endl;
        return;
    }
    fcntl(fd,F_SETFL,fl|O_NONBLOCK);
}